<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ page import="java.io.*,java.util.Date" %>
<%@ page import="javax.servlet.*,java.text.*" %>

<html>
<head>
    <title>显示当前时间与日期</title>
</head>
<body>
<h1>显示当前时间与日期</h1>
<hr>
<%
    Date dNow = new Date( );
    SimpleDateFormat ft =
            new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss");
    out.print( "<h2 align=\"center\">" + ft.format(dNow) + "</h2>");
    //response.sendRedirect("/book");
%>
<h1>hello</h1>

<hr>
<h2>h2/.....
</h2>